<%@ page language="java" import="java.util.*,entity.*,dao.*,dao.impl.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>发表话题</title>
        <style>
            *{margin:0;padding:0;}
            .divhead{
            margin-top:50px;
            height:50px; 
            text-align: center;
            line-height:50px; 
            }
            .divhead>p{
            text-shadow:#FF0000 0 0 10px;
            color:white;
            font-size:60px
            }
            .div2{
                margin-top:30px;
                text-align:center;
               
            }
            .div2>p{
                background-color: gray;
            }
            .div3{
	            width:800px;
                color:white;
                text-align: left;
                margin-left: 70px;
                margin-top: 10px;
	        }
            a:link{
                color:salmon;
            }
            a:visited{
                color:bisque;
            }
            a:hover{
                color:red;
            }
            .div4{
                margin-left:200px;
                border: solid 5px rgba(133, 133, 201, 0.616);
                color:white;
            }
            .div4>p{
                background-color: thistle;
            }
            table{
                margin-left:200px;
            }
            .input{
                width:500px;
                height:300px;
            }
        </style>
    </head>
    <body background="img/background.jpg">
        <div class="divhead">
            <p>北京科技大学天津学院BBS</p>
        </div>
        <div class ="div2">
            <%if(session.getAttribute("user")==null){ %>
            <%if(session.getAttribute("user")==null){ %>
            <p>您尚未<a href="login.jsp" target ="_blank">登录</a> | <a href="reg.jsp" target ="_blank">注册</a> 
            <%}else{            
            	User loginUser =(User)session.getAttribute("user"); 
            %>
            	您好：<%= loginUser.getUName() %></p>
             <%} %> 
            <%}else{            
            	User loginUser =(User)session.getAttribute("user"); 
            %>
            	您好：<%= loginUser.getUName() %>
             <%} %>
        </div>
        <div class="div3">
            &gt;&gt;&gt;<a href="index.jsp" target ="_blank">论坛首页</a>
            <%String boardName=request.getParameter("boardName");%>
             <% int boardId =Integer.parseInt(request.getParameter("boardId")); %>
            &gt;&gt;<a href="list.jsp?page=1&boardId=<%=boardId%>" target="_blank"><%=boardName%></a> 
        </div>
    <br/>
        <div class="div4">
            <form method="post" name="postForm" onsubmit="return check()" action="manage/doPost.jsp">   
            
                <p>发表帖子</p>
                    <table>
                        <tr>
                            <td>标题</td>
                            <td>
                                <input type="text" name="title"/>
                            </td>
                        </tr>
                        <tr>
                            <td>内容</td>
                            <td>
                                <textarea class="input"  name="content"></textarea>
                            </td>
                        </tr>
                    </table>
                
                    <center>
                        <input type="submit" name="submit" value="提交"/>
                        <input  type="reset" name="reset" value="重置"/>
                        <input type="hidden" name="boardId" value="<%=boardId%>"/>
                    </center>
            </form>
            
        </div>
            
    </body>
</html>
